package com.horoscope.astrology.zodiac.signs.free.bean

import android.os.Parcel
import android.os.Parcelable

class ArticleBean(var ad:Boolean = false) : BaseBean(), Parcelable {
    var content = ""
    var type = ""
    var url = ""
    var nativeAdBean: NativeAdBean? = null

    constructor(parcel: Parcel) : this() {
        content = parcel.readString()!!
        type = parcel.readString()!!
        url = parcel.readString()!!
        ad = parcel.readByte() != 0.toByte()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(content)
        parcel.writeString(type)
        parcel.writeString(url)
        parcel.writeByte(if (ad) 1 else 0)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<ArticleBean> {
        override fun createFromParcel(parcel: Parcel): ArticleBean {
            return ArticleBean(parcel)
        }

        override fun newArray(size: Int): Array<ArticleBean?> {
            return arrayOfNulls(size)
        }
    }
}